package vn.edu.saigontech.ncms.web.student;

import vn.edu.saigontech.ncms.util.Checker;
import vn.edu.saigontech.ncms.web.AbstractValidator;

@SuppressWarnings("serial")
public class ValidatePlacementTestTypeAction extends AbstractValidator {

	private Long id;
	private String name;
	private String fee;

	@Override
	public String check() {
		if(Checker.isEmpty(this.name)) {
			this.sendKeyError("validator.required", "name");
		}
		if(!Checker.isDouble(this.fee)) {
			this.sendKeyError("validator.invalid", "fee");
		}
		return this.toSuccess();
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFee() {
		return fee;
	}

	public void setFee(String fee) {
		this.fee = fee;
	}
}